<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>编辑书籍</title>
</head>
<body>
<h1>编辑书籍</h1>

<!-- 编辑表单 -->
<form th:action="@{/book/update}" th:object="${book}" method="post">
  <div>
    <label for="id">ID:</label>
    <input type="number" id="id" th:field="*{id}" readonly>
  </div>
  <div>
    <label for="type">类型:</label>
    <input type="text" id="type" th:field="*{type}" required>
  </div>
  <div>
    <label for="name">书名:</label>
    <input type="text" id="name" th:field="*{name}" required>
  </div>
  <div>
    <label for="description">描述:</label>
    <textarea id="description" th:field="*{description}" required></textarea>
  </div>
  <div>
    <button type="submit">更新</button>
  </div>
</form>

<a th:href="@{/book/{id}(id=${book.id})}">返回详情</a>
</body>
</html>